<?php /* @var $this Controller */ ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="language" content="en" />

        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->baseUrl; ?>/css/styles.css" />

        <title><?php echo CHtml::encode($this->pageTitle); ?></title>

        <?php Yii::app()->bootstrap->init(); ?>
    </head>

    <body>

        <?php
        $this->widget('bootstrap.widgets.TbNavbar', array(
            'items' => array(
                array(
                    'class' => 'bootstrap.widgets.TbMenu',
                    'items' => array(
                        "--",
                        array('label' => 'Home', 'url' => array('/site/index')),
                        array('label' => 'Actor', 'url' => array('/actor/admin')),
                        array('label' => 'Director', 'url' => array('/director/admin')),
                        array('label' => 'Country', 'url' => array('/country/admin')),
                        array('label' => 'Local', 'url' => array('/local/admin')),
                        array('label' => 'Menu', 'url' => array('/menu/admin')),
                        array('label' => 'User', 'url' => array('/user/admin')),
                        array('label' => 'Film', 'url' => array('/film/admin')),
                        array('label' => 'Episode', 'url' => array('/episode/admin')),
                    ),
                ),
                array('class' => 'bootstrap.widgets.TbButton',
                    'label' => 'Đăng nhập',
                    'type' => 'primary',
                    'url' => array('/site/login'),
                    'htmlOptions' => array(
                        'style' => Yii::app()->user->isGuest ? '' : 'display:none',
                        'class' => 'pull-right',
                    ),
                ),
                array('class' => 'bootstrap.widgets.TbButtonGroup',
                    'buttons' => array(
                        array('label' => Yii::app()->user->name, 'url' => '#'), // this makes it split :)
                        array('items' => array(
                                array('label' => 'Thông tin', 'url' => '#'),
                                array('label' => 'Thông báo', 'url' => '#'),
                                '---',
                                array('label' => 'Thoát', 'url' => array('/site/logout')),
                            )),
                    ),
                    'type' => 'info',
                    'htmlOptions' => array(
                        'style' => Yii::app()->user->isGuest ? 'display:none' : '',
                        'class' => 'pull-right',
                    ),
                ),
            ),
        ));
        ?>

        <div class="container" id="page">

            <?php if (isset($this->breadcrumbs)): ?>
                <?php
                $this->widget('bootstrap.widgets.TbBreadcrumbs', array(
                    'links' => $this->breadcrumbs,
                ));
                ?><!-- breadcrumbs -->
            <?php endif ?>

            <?php echo $content; ?>
            <hr>
                <div class="clear"></div>

                <div id="footer" style="position: static;bottom:0px;">
                    <p style="text-align: center;">Copyright &copy; <?php echo date('Y'); ?> by <b>XT Team</b>.<br/>
                        All Rights Reserved.<br/>
                        <?php echo Yii::powered(); ?></p>
                </div><!-- footer -->

        </div><!-- page -->

    </body>
</html>
